package Users;

import operation.*;
import sun.awt.geom.AreaOp;

import java.util.Scanner;

/**
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: 李白
 * @Created: 2024/8/19 16:26
 */
public class Admin extends Users {

    @Override
    public void work() {

    }

    public Admin(String name){
        super(name);
        super.ioPreparations = new IOPreparation[]{//每一个数组都是一个需要实例化的对象
                new ExitOperation(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new ShowOperation()
        };
    }
    public int menu(){
        System.out.println("*********管理员*********");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        System.out.println("0.退出系统");
        System.out.println("*********管理员*********");
        System.out.println("请选择您的操作");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();//参数choice只作用于方法内部
        return choice;

    }

}
